package com.lvmama.client.dw;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.github.pagehelper.PageInfo;
import com.lvmama.common.result.Result;
import com.lvmama.common.utils.PageInfoUtil;
import com.lvmama.pojo.dto.dw.PriceDetailQuery;
import com.lvmama.pojo.entity.dw.priceStock.PriceDetail;

/**
 * @Author:xuzhongwei
 * @Description:
 * @Date：2018/08/07
 */

@FeignClient("rhino-web-service")
@RequestMapping("${server.servlet.context-path}")
public interface PriceClient {
    
    /**
     * 查询价格详情	
     *
     * @param query 查询条件
     * @return 价格详情
     */
    @RequestMapping(method = RequestMethod.POST, value = "/price/selectPriceDetail", consumes = "application/json")
	Result<List<PriceDetail>> selectPriceDetail(@RequestBody PriceDetailQuery query);

    /**
     * 查询价格详情分页
     *
     * @param query 查询条件
     * @return 价格详情分页
     */
    @RequestMapping(method = RequestMethod.POST, value = "/price/selectPriceDetailPage", consumes = "application/json")
	Result<PageInfo<PriceDetail>> selectPriceDetailPage(@RequestBody PriceDetailQuery query);

    /**
     * 查询每条价格详情分页
     *
     * @param query 查询条件
     * @return 每条价格详情分页
     */
    @RequestMapping(method = RequestMethod.POST, value = "/price/selectAllPriceDetailPage", consumes = "application/json")
	Result<PageInfo<PriceDetail>> selectAllPriceDetailPage(@RequestBody PriceDetailQuery query);

    /**
     * 查询价格详情
     *
     * @param query 查询条件
     * @return 价格详情
     */
    @RequestMapping(method = RequestMethod.POST, value = "/price/selectPriceGather", consumes = "application/json")
	Result<List<PriceDetail>> selectPriceGather(@RequestBody PriceDetailQuery query);

    /**
     * 查询库存详情分页
     *
     * @param query 查询条件
     * @return 库存详情分页
     */
    @RequestMapping(method = RequestMethod.POST, value = "/price/selectPriceGatherPageByRedis", consumes = "application/json")
	Result<PageInfoUtil<PriceDetail>> selectPriceGatherPageByRedis(@RequestBody PriceDetailQuery query);
}
